package com.sinotrans.demo.test;

import com.sinotrans.common.util.db.MysqlTableToJava;

/**
 * mysql 数据表转换为 java 实体测试
 * 
 * @author ligaofu
 *
 */
public class MysqlTableToEntity {

	public static void main(String args[]) {

		// 数据库连接
		String jdbcUrl = "jdbc:mysql://localhost:3306/zt_storage?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8";
		String jdbcUser = "root";
		String jdbcPassword = "abc123";
		String jdbcDriver = "com.mysql.jdbc.Driver";

		String javaPackage = "com.sinotrans.storage";// 指定实体生成所在包的路径

		MysqlTableToJava mte = new MysqlTableToJava(jdbcUrl, jdbcUser, jdbcPassword, jdbcDriver);
		mte.allTableToJava(javaPackage);

		mte.close();
	}

}
